# docker pull leehom/qquanwei-gante:latest
# docker tag leehom/qquanwei-gante:latest registry.lazycat.cloud/appdb/qquanwei/gante:20230524
# docker build -t registry.lazycat.cloud/appdb/qquanwei/gante:20230524 .
# 第一阶段：构建应用程序
FROM node:16-alpine as deps
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn config set registry https://registry.npm.taobao.org/
RUN yarn install --frozen-lockfile

FROM node:16-alpine
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
ENV NODE_ENV production
RUN yarn build

EXPOSE 8088

CMD ["npm", "start"]